if (this.capitalFlowList.length === 0) {
    that.$store.dispatch("bar/switchAlert", {
      title: this.$t("tip.tip"),
      msg: this.$t("tip.fowNone"),
      type: 2
    });
    return;
  }
  this.jsdata = [];

  for (var j = 0; j < this.capitalFlowList.length; j++) {
    var st = [];
    st.push(this.capitalFlowList[j].DateTime);
    st.push(this.capitalFlowList[j].FlowSum);
    st.push(this.capitalFlowList[j].Currency);
    st.push(this.capitalFlowList[j].FlowType);
    st.push(this.capitalFlowList[j].Balance);
    st.push(this.capitalFlowList[j].SingleNo);

    this.jsdata.push(st);
  }

  var str = `${this.$t('market.time')},${this.$t('bank.amount')},${this.$t('capital.currency')},${this.$t('trade.type')},${this.$t('trade.balance')},${this.$t('trade.signNo')}\n`;

  //增加\t为了不让表格显示科学计数法或者其他格式
  for (let i = 0; i < this.jsdata.length; i++) {
    for (let n = 0; n < this.jsdata[i].length; n++) {
      if (n == 2 || n == 3 || n == 0) {
        this.jsdata[i][n] = this.jsdata[i][n] + "\xa0";
      }
      str += `${this.jsdata[i][n] + ""},`;
    }
    str += "\n";
  }
  //encodeURIComponent解决中文乱码
  let uri = "data:text/csv;charset=utf-8,\ufeff" + encodeURIComponent(str);
  // 通过创建a标签实现
  var link = document.createElement("a");
  var blob = new Blob(["\ufeff" + str], {
    type: "text/csv"
  }); // 解决大文件下载失败
  link.setAttribute("href", URL.createObjectURL(blob));
  // 对下载的文件命名
  link.download = `${Date.parse(new Date())}.csv`;
  document.body.appendChild(link);
  link.click();
  document.body.removeChild(link);